<template>
	<view class="bigView">
		<z-paging ref="paging" :show-default-loading-more-text="false" v-model="dataList" default-page-size="2" @query="queryList">
			<navBar slot="top" title="嘉人手册" />
			<view class="jiarenItem" v-for="(item,index) in dataList" :key="index">
				<view class="title">{{item.theme}}</view>
				<!-- <div class="content" v-html="item.content"></div> -->
				<u-parse class="content" :content="item.content" :lazyLoad="true"></u-parse>
			</view>
		</z-paging>
	</view>
</template>

<script>
	import navBar from "@/components/nav_bar.vue"
	import companyManual from '@/api/companyManual.js'
	export default{
		components:{
			navBar
		},
		data(){
			return {
				bottom:0,
				indexList:[1,2],
				dataList:[]
			}
		},
		mounted() {
			uni.getSystemInfo({success: (e) => {
				let custom = wx.getMenuButtonBoundingClientRect();
				this.bottom = custom.bottom;
			}})
		},
		methods:{
			scrolltolower() {
				// this.loadmore()
			},
			sureHandle(){
				uni.navigateBack()
			},
			// @query所绑定的方法不要自己调用！！需要刷新列表数据时，只需要调用this.$refs.paging.reload()即可
			queryList(pageNo, pageSize) {
				companyManual.listHandle({page:pageNo,size:pageSize}).then(res =>{
					if(pageNo==1){
						this.dataList = res.records;
					}else{
						this.dataList.concat(res.records)
					}
					this.$refs.paging.complete(res.records);
				}).catch(error =>{
					this.$refs.paging.complete(false);
				})
			}
		},
		onReady() {
			
		}
	}
</script>

<style lang="scss" scoped>
.bigView{
	width: 100vw;
	height: 100vh;
	background-color: #F7F7F7;
	display: flex;
	flex-direction: column;
}
.jiarenItem{
	display: flex;
	flex-direction: column;
	width: calc(100vw - 32px);
	border-radius: 12px;
	background-color: white;
	margin-left: 16px;
	margin-top: 8px;
	.title{
		color: #000000;
		font-size: 16px;
		height: 54px;
		border-bottom: #F7F7F7 solid 0.5px;
		width: 100%;
		display: flex;
		align-items: center;
		margin-left: 16px;
		// background-color: white;
	}
	.content{
		display: flex;
		width: 100%;
		padding: 16px;
		// background-color: red;
		margin-right: 16px;
		box-sizing: border-box; 
		line-height: 1.5;
	}
}
</style>